From b29e3d8ce020004d2ea966d6eb9ee00aa4700ce6 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 18 Jan 2014 10:53:22 -0500 Subject: [PATCH] a11y tests: Fix settings that affect a11y output It would be nicer if we could have the tests specify what environment their expected output was created in, then we could test multiple scenarios. For now, just fix the setting to avoid test failures. --- testsuite/a11y/accessibility-dump.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/testsuite/a11y/accessibility-dump.c b/testsuite/a11y/accessibility-dump.c index 4cfd518375..2b58ca8264 100644 --- a/testsuite/a11y/accessibility-dump.c +++ b/testsuite/a11y/accessibility-dump.c @@ -884,12 +884,26 @@ parse_command_line (int *argc, char ***argv) return TRUE; } +static void +fix_settings (void) +{ + /* Some settings can affect the output of the accessibility tests, + * so we take some steps to isolate us from the ambient environment. + */ + + g_object_set (gtk_settings_get_default (), + "gtk-dialogs-use-header", TRUE, + NULL); +} + int main (int argc, char **argv) { if (!parse_command_line (&argc, &argv)) return 1; + fix_settings (); + if (argc < 2) { const char *basedir; -- 2.30.2